<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); 
0
|| checktplrefresh('./template/huyou_zisy/forum/forumdisplay_zsy.htm', './template/huyou_zisy/forum/search_sortoptionm.htm', 1528784041, '2', './data/template/2_2_forum_forumdisplay_zsy.tpl.php', './template/huyou_zisy', 'forum/forumdisplay_zsy')
|| checktplrefresh('./template/huyou_zisy/forum/forumdisplay_zsy.htm', './template/huyou_zisy/forum/forumdisplay_sortm.htm', 1528784041, '2', './data/template/2_2_forum_forumdisplay_zsy.tpl.php', './template/huyou_zisy', 'forum/forumdisplay_zsy')
|| checktplrefresh('./template/huyou_zisy/forum/forumdisplay_zsy.htm', './template/huyou_zisy/forum/forumdisplay_listm.htm', 1528784041, '2', './data/template/2_2_forum_forumdisplay_zsy.tpl.php', './template/huyou_zisy', 'forum/forumdisplay_zsy')
;?>
<?php function klp_getspic($tid,$num,$type=''){
if($type == 'klp_cpicnums') {
return count(DB::fetch_all('SELECT tableid FROM '.DB::table('forum_attachment').' WHERE tid = '.$tid));
}
foreach (DB::fetch_all('SELECT tableid FROM '.DB::table('forum_attachment').' WHERE tid = '.$tid) as $klp_getpicinfo){
foreach ($getdata = DB::fetch_all('SELECT * FROM '.DB::table('forum_attachment_'.$klp_getpicinfo['tableid'].'').' WHERE tid = '.$tid . '  LIMIT  0 ,'.$num) as $klp_getspic){

if($type == 'klp_cpicsomes'){
$klp_picarr[$klp_getspic['aid']] = getforumimg($klp_getspic['aid'],'0','300','300','fixnone');
}else{
$klp_picarr[$klp_getspic['aid']] = getforumimg($klp_getspic['aid'],'0','160','160','fixnone');
}
}
break;
}
return $klp_picarr;
}
require_once(DISCUZ_ROOT."./source/function/function_post.php");?><div class="klp_mmolist">
<?php if($_G['forum']['icon']) { $parse = parse_url($_G['forum'][icon]);?><?php if(!isset($parse['host'])) { $_G['forum'][icon]=$_G['setting']['attachurl'].'common/'.$_G['forum'][icon];?><?php } } ?>   
          
<div class="mobile_bktop cl" > 
   <div class="klp_mlistbgblur"><?php if($_G['forum']['icon']) { ?><img src="<?php echo $_G['forum']['icon'];?>" /><?php } else { ?><img src="<?php echo IMGDIR;?>/forum<?php if($_G['forum']['folder']) { ?>_new<?php } ?>.gif" /><?php } ?></div>
<div class="f_btn"<?php if($_G['uid']) { ?> style="right: 70px;"<?php } ?> >
<a href="home.php?mod=spacecp&amp;ac=favorite&amp;type=forum&amp;id=<?php echo $_G['fid'];?>&amp;handlekey=favoriteforum&amp;formhash=<?php echo FORMHASH;?>" id="a_favorite" class="klp_mfav" onclick="showWindow(this.id, this.href, 'get', 0);">+ 关注</a>
</div> 
<?php if($_G['uid']) { ?><div class="f_btn">
<a href="forum.php?mod=post&amp;action=newthread&amp;fid=<?php echo $_G['fid'];?>"  class="klp_mfav" >发布</a>
</div><?php } ?>
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>" class="hd_box"> 
<div class="f_ico">
 <?php if($_G['forum']['icon']) { ?><img src="<?php echo $_G['forum']['icon'];?>" /><?php } else { ?><img src="<?php echo IMGDIR;?>/forum<?php if($_G['forum']['folder']) { ?>_new<?php } ?>.gif" class="forumico"/><?php } ?>
</div>
<h2 class="f_name"><?php echo $_G['forum']['name'];?></h2>
<p class="f_info">今日: <?php echo $_G['forum']['todayposts'];?>&nbsp;&nbsp;主题: <?php echo $_G['forum']['threads'];?>&nbsp;&nbsp;关注: <?php echo $_G['forum']['favtimes'];?></p> <?php if(!$subforumonly) { } if($_G['page'] == 1 && $_G['forum']['rules']) { ?>
<style type="text/css">
.mobile_bktop h2{margin-top: 2px;}
</style>
<p class="f_rules"><?php echo $_G['forum']['rules'];?></p><?php } ?></a> 
</div>  

<?php if($subexists && $_G['page'] == 1) { include template('forum/forumdisplay_subforumm'); } ?>   
  
      
                
                                
<div class="tl cl" <?php if($_G['uid']) { ?> style="position: relative;"<?php } ?>>
<div class="klp_mtypes cl">
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>" <?php if(!$_GET['filter']) { ?>class="cur"<?php } ?>>全部</a>			
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=lastpost&amp;orderby=lastpost<?php echo $forumdisplayadd['lastpost'];?><?php if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>" class="<?php if($_GET['filter'] == 'lastpost') { ?>cur<?php } ?>">最新</a>
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=heat&amp;orderby=heats<?php echo $forumdisplayadd['heat'];?><?php if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>" class="<?php if($_GET['filter'] == 'heat') { ?>cur<?php } ?>">热门</a>
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=digest&amp;digest=1<?php echo $forumdisplayadd['digest'];?><?php if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>" class="<?php if($_GET['filter'] == 'digest') { ?>cur<?php } ?>">精华</a>
<?php if(($_G['forum']['threadtypes'] && $_G['forum']['threadtypes']['listable']) || count($_G['forum']['threadsorts']['types']) > 0) { ?>
<a id="thread_types" onclick="toggle_collapse('thread_types_menu')">分类<i class="showmenu"></i></a>
<?php } else { ?>
<a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=hot" class="<?php if($_GET['filter'] == 'hot') { ?>cur<?php } ?>">热帖</a>
<?php } ?>
</div>
<?php if(($_G['forum']['threadtypes'] && $_G['forum']['threadtypes']['listable']) || count($_G['forum']['threadsorts']['types']) > 0) { ?>
<div id="thread_types_menu" class="cl" style="display: none;">
<ul class="klp_mttp">
<?php if(!empty($_G['setting']['pluginhooks']['forumdisplay_threadtype_inner'])) echo $_G['setting']['pluginhooks']['forumdisplay_threadtype_inner'];?>
<li id="ttp_all" <?php if(!$_GET['typeid'] && !$_GET['sortid']) { ?>class="cur a"<?php } ?>><a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?><?php if($_G['forum']['threadsorts']['defaultshow']) { ?>&amp;filter=sortall&amp;sortall=1<?php } if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>">全部</a></li>
<?php if($_G['forum']['threadtypes']) { if(is_array($_G['forum']['threadtypes']['types'])) foreach($_G['forum']['threadtypes']['types'] as $id => $name) { if($_GET['typeid'] == $id) { ?>
<li class="cur a"><a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?><?php if($_GET['sortid']) { ?>&amp;filter=sortid&amp;sortid=<?php echo $_GET['sortid'];?><?php } if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>"><?php if($_G['forum']['threadtypes']['icons'][$id] && $_G['forum']['threadtypes']['prefix'] == 2) { ?><img class="vm" src="<?php echo $_G['forum']['threadtypes']['icons'][$id];?>" alt="" /> <?php } ?><?php echo $name;?><?php if($showthreadclasscount['typeid'][$id]) { ?><span class="xg1 num"><?php echo $showthreadclasscount['typeid'][$id];?></span><?php } ?></a></li>
<?php } else { ?>
<li><a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=typeid&amp;typeid=<?php echo $id;?><?php echo $forumdisplayadd['typeid'];?><?php if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>"><?php if($_G['forum']['threadtypes']['icons'][$id] && $_G['forum']['threadtypes']['prefix'] == 2) { ?><img class="vm" src="<?php echo $_G['forum']['threadtypes']['icons'][$id];?>" alt="" /> <?php } ?><?php echo $name;?><?php if($showthreadclasscount['typeid'][$id]) { ?><span class="xg1 num"><?php echo $showthreadclasscount['typeid'][$id];?></span><?php } ?></a></li>
<?php } } } if($_G['forum']['threadsorts']) { if(is_array($_G['forum']['threadsorts']['types'])) foreach($_G['forum']['threadsorts']['types'] as $id => $name) { if($_GET['sortid'] == $id) { ?>
<li class="cur a"><a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?><?php if($_GET['typeid']) { ?>&amp;filter=typeid&amp;typeid=<?php echo $_GET['typeid'];?><?php } if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>"><?php echo $name;?><?php if($showthreadclasscount['sortid'][$id]) { ?><span class="xg1 num"><?php echo $showthreadclasscount['sortid'][$id];?></span><?php } ?></a></li>
<?php } else { ?>
<li><a href="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=sortid&amp;sortid=<?php echo $id;?><?php echo $forumdisplayadd['sortid'];?><?php if($_GET['archiveid']) { ?>&amp;archiveid=<?php echo $_GET['archiveid'];?><?php } ?>"><?php echo $name;?><?php if($showthreadclasscount['sortid'][$id]) { ?><span class="xg1 num"><?php echo $showthreadclasscount['sortid'][$id];?></span><?php } ?></a></li>
<?php } } } ?>
</ul>
   </div>
<?php } if($quicksearchlist && !$_GET['archiveid']) { ?> <style type="text/css">
.klp_mosortbtn{ background: #fff; margin-bottom: 10px;}
.mosorttitle{ height: 38px; line-height: 38px; overflow: hidden; font-size: 14px; padding: 0 6px;}
.mosorttitle span.klp_sortname{ color: #bbbbbb;  float: left;}
.mosorttitle span.klp_msortgj{ color: #ff9900; font-size: 13px; float: right; padding-right: 15px; background: url(template/huyou_zisy/klp_img/klp_sorton.png) no-repeat right center; background-size:20%;}
.mosorttitle span.klp_msortgj.klp_sorton{ background-image: url(template/huyou_zisy/klp_img/klp_sortoff.png)}
</style>
<div class="klp_mosortbtn cl">
<div class="mosorttitle"><span class="klp_sortname"> 可以用更高级方式筛选您想要的信息>></span><span class="klp_msortgj">高级搜索</span></div>
</div>
    <script>  
    jQuery(function(){  
        jQuery('.klp_msortgj').click(function(){
            if(jQuery('.klp_mosort').is(':hidden')){
            jQuery('.klp_mosort').show(); 
 jQuery(".klp_msortgj").addClass("klp_sorton"); 
            }else{
            jQuery('.klp_mosort').hide();
 jQuery(".klp_msortgj").removeClass("klp_sorton"); 
            }  
        })  
    })  
    </script>  
<div class="dismnone klp_mosort cl" style="display: none;">
<script type="text/javascript">
var forum_optionlist = <?php if($forum_optionlist) { ?>'<?php echo $forum_optionlist;?>'<?php } else { ?>''<?php } ?>;
</script>
<script src="<?php echo $_G['setting']['jspath'];?>threadsort.js?<?php echo VERHASH;?>" type="text/javascript"></script><?php if(is_array($quicksearchlist)) foreach($quicksearchlist as $optionid => $option) { $formsearch_zsy = '';?>        <?php if(getstatus($option['search'], 1)) { ?>
        <?php
$__VERHASH = VERHASH;$formsearch_zsy = <<<EOF

            <div style="
EOF;
 if($option['type'] == 'checkbox') { 
$formsearch_zsy .= <<<EOF
clear:left;padding-bottom: 5px;
EOF;
 } else { 
$formsearch_zsy .= <<<EOF
float: left;width: 48%;height: 50px; overflow: hidden;
EOF;
 } 
$formsearch_zsy .= <<<EOF
">
                <span style="padding-right: 1em;">{$option['title']}:</span>
                
EOF;
 if(in_array($option['type'], array('radio', 'checkbox', 'select', 'range'))) { 
$formsearch_zsy .= <<<EOF

                    <span id="select_{$option['identifier']}">
                    
EOF;
 if($option['type'] == 'select') { 
$formsearch_zsy .= <<<EOF

                        
EOF;
 if($_GET['searchoption'][$optionid]['value']) { 
$formsearch_zsy .= <<<EOF

                            <script type="text/javascript">
                                changeselectthreadsort('{$_GET['searchoption'][$optionid]['value']}', {$optionid}, 'search');
                            </script>
                        
EOF;
 } else { 
$formsearch_zsy .= <<<EOF

                            <select name="searchoption[{$optionid}][value]" id="{$option['identifier']}" onchange="changeselectthreadsort(this.value, '{$optionid}', 'search');" class="ps vm">
                                <option value="0">请选择</option>
                            
EOF;
 if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { 
$formsearch_zsy .= <<<EOF
                                
EOF;
 if(!$value['foptionid']) { 
$formsearch_zsy .= <<<EOF

                                <option value="{$id}">{$value['content']} 
EOF;
 if($value['level'] != 1) { 
$formsearch_zsy .= <<<EOF
&raquo;
EOF;
 } 
$formsearch_zsy .= <<<EOF
</option>
                                
EOF;
 } 
$formsearch_zsy .= <<<EOF

                            
EOF;
 } 
$formsearch_zsy .= <<<EOF

                            </select>
<input type="hidden" name="searchoption[{$optionid}][type]" value="{$option['type']}">
                        
EOF;
 } 
$formsearch_zsy .= <<<EOF

                    
EOF;
 } elseif($option['type'] != 'checkbox') { 
$formsearch_zsy .= <<<EOF

                        <select name="searchoption[{$optionid}][value]" id="{$option['identifier']}" class="ps vm">
                            <option value="0">请选择</option>
                        
EOF;
 if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { 
$formsearch_zsy .= <<<EOF
                            <option value="{$id}" 
EOF;
 if($_GET['searchoption'][$optionid]['value'] == $id) { 
$formsearch_zsy .= <<<EOF
selected="selected"
EOF;
 } 
$formsearch_zsy .= <<<EOF
>{$value}</option>
                        
EOF;
 } 
$formsearch_zsy .= <<<EOF

                        </select>
                        <input type="hidden" name="searchoption[{$optionid}][type]" value="{$option['type']}">
                    
EOF;
 } else { 
$formsearch_zsy .= <<<EOF

                        
EOF;
 if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { 
$formsearch_zsy .= <<<EOF
                            <label><input type="checkbox" class="pc" name="searchoption[{$optionid}][value][{$id}]" value="{$id}" 
EOF;
 if(is_array($_GET['searchoption'][$optionid]) && $_GET['searchoption'][$optionid]['value'][$id]) { 
$formsearch_zsy .= <<<EOF
checked="checked"
EOF;
 } 
$formsearch_zsy .= <<<EOF
>{$value}</label>
                        
EOF;
 } 
$formsearch_zsy .= <<<EOF

                        <input type="hidden" name="searchoption[{$optionid}][type]" value="checkbox">
                    
EOF;
 } 
$formsearch_zsy .= <<<EOF

                    </span>
                
EOF;
 } else { 
$formsearch_zsy .= <<<EOF

                    
EOF;
 if($option['type'] == 'calendar') { 
$formsearch_zsy .= <<<EOF

                        <script src="{$_G['setting']['jspath']}calendar.js?{$__VERHASH}" type="text/javascript"></script>
                        <input type="text" name="searchoption[{$optionid}][value]" size="15" class="px vm" value="
EOF;
 if(is_array($_GET['searchoption'][$optionid])) { 
$formsearch_zsy .= <<<EOF
{$_GET['searchoption'][$optionid]['value']}
EOF;
 } 
$formsearch_zsy .= <<<EOF
" onclick="showcalendar(event, this, false)" />
                    
EOF;
 } else { 
$formsearch_zsy .= <<<EOF

                        <input type="text" name="searchoption[{$optionid}][value]" size="15" class="px vm" value="
EOF;
 if(is_array($_GET['searchoption'][$optionid])) { 
$formsearch_zsy .= <<<EOF
{$_GET['searchoption'][$optionid]['value']}
EOF;
 } 
$formsearch_zsy .= <<<EOF
" />
                    
EOF;
 } 
$formsearch_zsy .= <<<EOF

                
EOF;
 } 
$formsearch_zsy .= <<<EOF

            </div>
            
EOF;
?>
<?php } ?>
    <?php $formsearch_zsy_html .= $formsearch_zsy;?><?php $fontsearch_zsy = '';$showoption = array();$tmpcount = 0;?><?php if(getstatus($option['search'], 2)) { ?>
    <?php
$fontsearch_zsy = <<<EOF

<article class="region1 dismnone">
            <dl>
<dt>{$option['title']}:</dt>
            <dd>
              <a href="forum.php?mod=forumdisplay&amp;fid={$_G['fid']}&amp;filter=sortid&amp;sortid={$_GET['sortid']}&amp;searchsort=1{$filterurladd}&amp;{$option['identifier']}=all{$sorturladdarray[$option['identifier']]}" 
EOF;
 if($_GET[''.$option['identifier']] == 'all' || !isset($_GET[''.$option['identifier']])) { 
$fontsearch_zsy .= <<<EOF
 class="Checked"
EOF;
 } 
$fontsearch_zsy .= <<<EOF
>不限</a>

EOF;
 if($option['type'] == 'select') { if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { if($value['foptionid'] == 0) { 
$fontsearch_zsy .= <<<EOF

<a
EOF;
 if(preg_match('/^'.$value['optionid'].'\./i', $_GET[''.$option['identifier']]) || preg_match('/^'.$value['optionid'].'$/i', $_GET[''.$option['identifier']])) { 
$fontsearch_zsy .= <<<EOF
 class="Checked"
EOF;
 } 
$fontsearch_zsy .= <<<EOF
 href="forum.php?mod=forumdisplay&amp;fid={$_G['fid']}&amp;filter=sortid&amp;sortid={$_GET['sortid']}&amp;searchsort=1&amp;{$option['identifier']}={$id}{$sorturladdarray[$option['identifier']]}" >{$value['content']}</a>

EOF;
 } } if(!($_GET[''.$option['identifier']] == 'all' || !isset($_GET[''.$option['identifier']]))) { if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { if((preg_match('/^'.$value['foptionid'].'\./i', $_GET[''.$option['identifier']]) || preg_match('/^'.$value['foptionid'].'$/i', $_GET[''.$option['identifier']])) && ($showoption[$value['count']][$id] = $value)) { } } if(ksort($showoption)) { } if(is_array($showoption)) foreach($showoption as $optioncount => $values) { if($tmpcount != $optioncount && ($tmpcount = $optioncount)) { if(is_array($values)) foreach($values as $id => $value) { 
$fontsearch_zsy .= <<<EOF
<a 
EOF;
 if(preg_match('/^'.$value['optionid'].'\./i', $_GET[''.$option['identifier']]) || preg_match('/^'.$value['optionid'].'$/i', $_GET[''.$option['identifier']])) { 
$fontsearch_zsy .= <<<EOF
 class="Checked"
EOF;
 } 
$fontsearch_zsy .= <<<EOF
 href="forum.php?mod=forumdisplay&amp;fid={$_G['fid']}&amp;filter=sortid&amp;sortid={$_GET['sortid']}&amp;searchsort=1&amp;{$option['identifier']}={$id}{$sorturladdarray[$option['identifier']]}" >{$value['content']}</a>

EOF;
 } } } } } else { if(is_array($option['choices'])) foreach($option['choices'] as $id => $value) { 
$fontsearch_zsy .= <<<EOF
<a 
EOF;
 if($_GET[''.$option['identifier']] && !strcmp($id, $_GET[''.$option['identifier']])) { 
$fontsearch_zsy .= <<<EOF
 class="Checked"
EOF;
 } 
$fontsearch_zsy .= <<<EOF
  href="forum.php?mod=forumdisplay&amp;fid={$_G['fid']}&amp;filter=sortid&amp;sortid={$_GET['sortid']}&amp;searchsort=1&amp;{$option['identifier']}={$id}{$sorturladdarray[$option['identifier']]}" >{$value}</a>

EOF;
 } } 
$fontsearch_zsy .= <<<EOF

                
            </dd>
                </dl>
</article>

EOF;
?>
     <?php } ?>
     <?php $fontsearch_zsy_html .= $fontsearch_zsy;?><?php } if($formsearch_zsy_html || $fontsearch_zsy_html) { ?>
<div>
<?php if($fontsearch_zsy_html) { ?>
    <section class="region" id="fontsearch_zsy">
    
         <?php echo $fontsearch_zsy_html;?>
    </section>
<?php } ?>
    <div style="clear:both; overflow:hidden"></div>
<?php if($formsearch_zsy_html) { ?>
    <form method="post" autocomplete="off" name="searhsort" id="searhsort" class="bm_c brtb slnr" action="forum.php?mod=forumdisplay&amp;fid=<?php echo $_G['fid'];?>&amp;filter=sortid&amp;sortid=<?php echo $_GET['sortid'];?>">
        <input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
        <?php echo $formsearch_zsy_html;?>
        <div class="ptm cl"><button type="submit" class="button2" name="searchsortsubmit"><em>搜索</em></button></div>
    </form>
<?php } ?>
</div>
<?php } ?>
<div style="clear:both; height:15px; overflow:hidden;"></div>
</div> 
<?php } ?>  

<?php if($quicksearchlist && !$_GET['archiveid']) { ?> 

<?php if(!empty($_G['setting']['pluginhooks']['forumdisplay_top_mobile'])) echo $_G['setting']['pluginhooks']['forumdisplay_top_mobile'];?> 
<!-- main threadlist start --> <div id="threadlist" class="bm bmw"<?php if($_G['uid']) { ?> style="position: relative;"<?php } ?>>

<?php echo $sorttemplate['header'];?>
<form method="post" autocomplete="off" name="moderate" id="moderate" action="forum.php?mod=topicadmin&amp;action=moderate&amp;fid=<?php echo $_G['fid'];?>&amp;infloat=yes&amp;nopost=yes">
<?php echo $sorttemplate['body'];?>
<?php if($_G['forum']['ismoderator'] && $_G['forum_threadcount']) { include template('forum/topicadmin_modlayer'); } ?>
</form>
<?php echo $sorttemplate['footer'];?>
</div>
<div style=" clear:both; height:5px; overflow:hidden;"></div>
<?php } else { ?>		<div class="klp_con" >
<?php if(!$subforumonly) { ?>
<div class="threadlist cl <?php if($_G['forum']['picstyle']) { ?>klp_pic<?php } else { ?>klp_tilists<?php } ?>">
<?php if(empty($_G['forum']['picstyle'])) { ?>

<ul id="mothreadlisttableid">                
<?php if($_G['forum_threadcount']) { if(is_array($_G['forum_threadlist'])) foreach($_G['forum_threadlist'] as $key => $thread) { if($thread['displayorder'] > 0 && !$displayorder_thread) { $displayorder_thread = 1;?><?php } if($thread['moved']) { $thread[tid]=$thread[closed];?><?php } $klp_cpicnums = klp_getspic($thread[tid],1,'klp_cpicnums');?><li id="mo_<?php echo $thread['id'];?>"<?php if($_G['hiddenexists'] && $thread['hidden']) { ?> style='display:none'<?php } ?>>
<a class="klp_imglistm" href="forum.php?mod=viewthread&amp;tid=<?php echo $thread['tid'];?>&amp;extra=<?php echo $extra;?>">

<div class="klp_thlisthead">
<div class="klp_ftou"><?php echo avatar($thread[authorid],small);?></div>
<h4>
<div class="count y">
<span class="chakan icon"><?php if($thread['isgroup'] != 1) { ?><?php echo $thread['views'];?><?php } else { ?><?php echo $groupnames[$thread['tid']]['views'];?><?php } ?></span>
<span class="huifu icon"><?php echo $thread['replies'];?></span>
</div>
<span class="th_zuozhe"><?php echo $thread['author'];?></span>   发布于 <?php echo $thread['dateline'];?>
</h4>

</div>
<?php if($klp_cpicnums !== 1) { ?>

<h3 class="klp_listtitle">
<?php if($thread['special'] == 1) { ?>
<span class="threadType">投票</span>
<?php } elseif($thread['special'] == 2) { ?>
<span class="threadType">商品</span>
<?php } elseif($thread['special'] == 3) { ?>
<span class="threadType">悬赏</span>
<?php } elseif($thread['special'] == 4) { ?>
<span class="threadType">活动</span>
<?php } elseif($thread['special'] == 5) { ?>
<span class="threadType">辩论</span>
<?php } elseif(in_array($thread['displayorder'], array(1, 2, 3, 4))) { ?>
<span class="jinghuatie">顶</span>
<?php } elseif($thread['digest'] > 0) { ?>
<span class="jinghuatie">精</span>
<?php } ?>
<span  <?php echo $thread['highlight'];?>><?php echo $thread['subject'];?></span>
</h3>
<?php } if($klp_cpicnums >= 2) { $width=$klp_cpicnums==2?'300':'200';?><?php $height=$klp_cpicnums==2?'180':'200';?><div class="klp_imglistsome <?php if($klp_cpicnums == 2) { ?>twopic<?php } ?> mt20  cl">
<ul class="cl"><?php $klp_cpicsomes=klp_getspic($thread[tid],3,'klp_cpicsomes');?><?php $i=1;?> <?php if(is_array($klp_cpicsomes)) foreach($klp_cpicsomes as $key) { ?>                        
<li><span><img src="<?php echo $key;?>" ></span></li><?php $i++;?> 
<?php } ?>
</ul>
</div>

<?php } elseif($klp_cpicnums == 1) { ?>
<div class="klp_imglistonly cl">
<div class="klp_nei">
<h3 class="klp_listtitle">
<?php if($thread['special'] == 1) { ?>
<span class="threadType">投票</span>
<?php } elseif($thread['special'] == 2) { ?>
<span class="threadType">商品</span>
<?php } elseif($thread['special'] == 3) { ?>
<span class="threadType">悬赏</span>
<?php } elseif($thread['special'] == 4) { ?>
<span class="threadType">活动</span>
<?php } elseif($thread['special'] == 5) { ?>
<span class="threadType">辩论</span>
<?php } elseif(in_array($thread['displayorder'], array(1, 2, 3, 4))) { ?>
<span class="jinghuatie">顶</span>
<?php } elseif($thread['digest'] > 0) { ?>
<span class="jinghuatie">精</span>
<?php } ?>
<span  <?php echo $thread['highlight'];?>><?php echo $thread['subject'];?></span>
</h3>


</div>
<div class="klp_imgonlym"><?php $klp_cpicsomes=klp_getspic($thread[tid],1,'klp_cpicsomes');?><img src="<?php echo current($klp_cpicsomes); ?>" />
</div>

</div>

<?php } ?>
   <div class="klp_clear"></div>
   <div class="cl klp_msstie"><p><?php echo messagecutstr(DB::result_first('SELECT `message` FROM '.DB::table('forum_post').' WHERE `tid` ='.$thread['tid'].' AND `first` =1'),99); ?></p></div>
</a>
</li>
<?php } } else { ?>
<li class="hasnone">本版块或指定的范围内尚无主题</li>
<?php } ?>
</ul>
 <?php } else { ?>
<div  class="wrapper"> 
<?php if($_G['forum_threadcount']) { ?> 
<ul class="wall" id="mothreadlisttableid"><?php if(is_array($_G['forum_threadlist'])) foreach($_G['forum_threadlist'] as $key => $thread) { ?> 

<?php if($thread['displayorder'] > 0 && !$displayorder_thread) { ?> <?php $displayorder_thread = 1;?> 
<?php } ?> 
<?php if($thread['moved']) { ?> <?php $thread[tid]=$thread[closed];?> 
<?php } ?> 
<li id="mo_<?php echo $thread['id'];?>"<?php if($_G['hiddenexists'] && $thread['hidden']) { ?> style='display:none'<?php } ?> class="article">
<a href="forum.php?mod=viewthread&amp;tid=<?php echo $thread['tid'];?>&amp;extra=<?php echo $extra;?>" <?php echo $thread['highlight'];?> > 
<?php if($thread['cover']) { ?> 
<img src="<?php echo $thread['coverpath'];?>"/> 
<?php } else { ?> 
<img  src="<?php echo $_G['style']['styleimgdir'];?>/images/klp_nopic.png"/> 
<?php } ?> 
<?php if(!empty($_G['setting']['pluginhooks']['forumdisplay_thread_mobile'][$key])) echo $_G['setting']['pluginhooks']['forumdisplay_thread_mobile'][$key];?>
<div class="klp_clear"></div>
<p>
<?php echo $thread['subject'];?> 
</p>
<p class="klp_wallthlisthead">
<span class="klp_ftou"><?php echo avatar($thread[authorid],small);?></span> <span class="klp_wallau"><?php echo $thread['author'];?> </span>
<span class="huifu icon y"><?php echo $thread['replies'];?></span>
</p>
</a> 
</li>
<?php } ?> 
</ul>
<?php } else { ?> 
<a>本版块或指定的范围内尚无主题</a> 
<?php } ?> 
 </div>
  <?php } ?>
 </div>
<?php } ?>
</div><?php } ?>
</div>


<div class="bm bw0 pgs klp_mpgs cl">
<span id="klp_page"><?php echo $multipage;?></span>
</div>
<div class="pullrefresh" style="display:none;"></div>
<script src="<?php echo $_G['style']['styleimgdir'];?>/js/jaliswall.js" type="text/javascript"></script>
<script type="text/javascript">
jq(function(){
jq('.wall').jaliswall({ item: '.article' });
});
</script>
</div>